Published patent application DE 10 2008 042 091 relates to a method for producing a magnetic field sensor and a sensor manufactured by the proposed method, in particular a rotation speed and/or rotation direction sensor for wheel rotation or for the drive train of a motor vehicle. In this case, an electrical module of the sensor together with a connection cable is encapsulated with plastic by means of injection molding, and a fastening tab is simultaneously molded on, the connection cable being bent in an angular position with respect to the overmolded module after the molding process, and being positioned and retained in this position in the same manufacturing process.